package com.huaxinkaiye.activity;

import com.huaxinkaiye.R;
import com.huaxinkaiye.utils.ToastUtil;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class CanZhiActivity extends Activity implements OnClickListener {
	private ImageView im_daishenpi, im_wofaqi, im_newshenqing;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_canzhi);
		initView();
	}

	private void initView() {
		// TODO Auto-generated method stub
		im_daishenpi = (ImageView) findViewById(R.id.im_daishenpi);
		im_daishenpi.setOnClickListener(this);
		// im_wofaqi = (ImageView) findViewById(R.id.im_wofaqi);
		// im_wofaqi.setOnClickListener(this);
		im_newshenqing = (ImageView) findViewById(R.id.im_newshenqing);
		im_newshenqing.setOnClickListener(this);
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.im_daishenpi:
			if (MainActivity.roles.contains("议价审核")) {
				Intent intent = new Intent(this, DaiWoShenPiListActivity.class);
				startActivity(intent);
			} else {
				ToastUtil.show(this, "没有权限");
			}
			break;
		// case R.id.im_wofaqi:
		// Intent intent3=new Intent(this,MineSetShenPiActivity.class);
		// startActivity(intent3);
		// break;
		case R.id.im_newshenqing:
			if (MainActivity.roles.contains("议价申请")) {
				Intent intent2 = new Intent(this, NewSQListActivity.class);
				startActivity(intent2);
			} else {
				ToastUtil.show(this, "没有权限");
			}
			break;
		}
	}

}
